//* TOOL OF TEMPLATE MANAGEMENT
const fs = require('fs')
const PATH = 'source/app/mode.ts'
const raw = fs.readFileSync(PATH).toString().trim()
const parts = raw.split('"')
const mode = process.argv[2]
if (mode === 'dev') {
  parts[1] = 'dev'
} else {
  parts[1] = 'build'
}
const processed = parts.join('"')
fs.writeFileSync(PATH, processed)
console.log('[script.js] mode fixed successfully!')
